package com.project.bookstore.user.mapper;

import com.project.bookstore.user.domain.Address;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bookstore.user.pojo.AddressForPayVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 12603
* @description 针对表【t_address(收货地址)】的数据库操作Mapper
* @createDate 2022-05-14 20:12:16
* @Entity com.project.bookstore.user.domain.Address
*/
@Repository
public interface AddressMapper extends BaseMapper<Address> {

    /**
     * 通过用户名查询地址信息
     * @param userId
     * @return
     */
    List<AddressForPayVO> listByUserId(Long userId);

    /**
     *
     * @param userId
     * @return
     */
    int updateIsDefault0(Long userId);

    /**
     * 修改
     * @param addressId
     * @param address
     * @return
     */
    int myUpdateById(Long addressId, Address address);
}




